#ifndef FRAME_H
#define FRAME_H
#include <pcap.h>
#include "ether.h"

class EtherFrame
{
    struct ether_header *ep;
    u_int caplen;
    u_int length;
    struct timeval ts;	/* time stamp */

    int ip_dissection(u_char *nxtLayer, uint length);
    int dealNexLayer(u_short ether_type, u_char *nxtLayer, uint nxtLayerLength, uint nxtCaplen);
public:
    EtherFrame(const struct pcap_pkthdr * pkthdr, const u_char * packet);
    int dissection();
};

#endif // FRAME_H
